class CreatePatientIndexesForLookups < ActiveRecord::Migration
  def self.up
    add_index :patients, :hospice_branch_id
    add_index :patients, :res_address_suburb_id
    add_index :patients, :post_address_suburb_id
    add_index :patients, :marital_status_id
    add_index :patients, :religion_id
    add_index :patients, :medical_aid_id
    add_index :patients, :medical_insurance_id
    add_index :patients, :undertaker_id
    add_index :patients, :burial_type_id
    add_index :patients, :emp_address_suburb_id
    add_index :patients, :referring_institute_id
    add_index :patients, :referring_doctor_id
    add_index :patients, :sister_id
    add_index :patients, :social_worker_id
    add_index :patients, :patient_status_id
    add_index :patients, :death_location_id
    add_index :patients, :admission_reason_id
    add_index :patients, :hospice_doctor_id
  end

  def self.down
    remove_index :patients, :hospice_branch_id
    remove_index :patients, :res_address_suburb_id
    remove_index :patients, :post_address_suburb_id
    remove_index :patients, :marital_status_id
    remove_index :patients, :religion_id
    remove_index :patients, :medical_aid_id
    remove_index :patients, :medical_insurance_id
    remove_index :patients, :undertaker_id
    remove_index :patients, :burial_type_id
    remove_index :patients, :emp_address_suburb_id
    remove_index :patients, :referring_institute_id
    remove_index :patients, :referring_doctor_id
    remove_index :patients, :sister_id
    remove_index :patients, :social_worker_id
    remove_index :patients, :patient_status_id
    remove_index :patients, :death_location_id
    remove_index :patients, :admission_reason_id
    remove_index :patients, :hospice_doctor_id
  end
end
